/*
 *NOTE:Auto generated dao
*/
package com.surfilter.modules.syslog.dao;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.surfilter.modules.syslog.model.PlSyslogModel;
import com.surfilter.modules.syslog.model.SyslogQueryCondition;
import com.surfilter.platform.base.dao.DaoBase;
import com.surfilter.platform.base.model.PageInfo;

@Repository(value="Service_syslogPlSyslogDao")
public class PlSyslogDao extends DaoBase<PlSyslogModel>{

	@Resource(name = "surfilterSqlMapClient")
	private SqlMapClient sqlMapClient;

	public void initSqlMapClient() {
		this.setSqlMapClient(sqlMapClient);
	}
	
		public int addPlSyslog(PlSyslogModel plSyslogModel) {
		int key = (Integer) this.addObject("addPlSyslog", plSyslogModel);
		return key;
	}
	
	public void chgPlSyslog(PlSyslogModel plSyslogModel) {
		this.updateObject("chgPlSyslog", plSyslogModel);
	}
	
	public void delPlSyslog(PlSyslogModel plSyslogModel) {
		this.updateObject("delPlSyslog", plSyslogModel);
	}

	public List<PlSyslogModel> getPlSyslogs(PlSyslogModel plSyslogModel, PageInfo pageInfo) {
		return this.getListByObjectForPage("getPlSyslogs", plSyslogModel, pageInfo);
	}
	
	public void delPlSyslogs(List<Integer> ids){
		this.deleteObject("delPlSyslogs", ids);
	}
	
	public int getPlSyslogsCount(PlSyslogModel plSyslogModel) {
		return (Integer) this.getObjectByObject("getPlSyslogsCount", plSyslogModel);
	}

	/**
	 * @param condition
	 * @param pageInfo 
	 */
	public List<PlSyslogModel>  querySyslogsByCondition(SyslogQueryCondition condition, PageInfo pageInfo) {
		return this.getListByObjectForPage("getPlSyslogsByCondition", condition, pageInfo);
	}

	/**
	 * @param condition
	 * @return
	 */
	public int querySyslogsByConditionCount(
			SyslogQueryCondition condition) {
		return (Integer) this.getObjectByObject("getPlSyslogsByConditionCount", condition);
	}
}
